const KoaRouter = require('@koa/router')
const { verifyAuth } = require('../middleware/login.middleware')
const { create, read, readByName } = require('../controller/lable.controller')

// 1.定义路由对象
const lableRouter = new KoaRouter({ prefix: "/lable" })

// 2.具体路由规则
// 创建标签
lableRouter.post('/createLable', verifyAuth, create)
// 获取标签列表
lableRouter.get('/getLables', read)
// 获取标签列表by name
lableRouter.get('/getLablesByName', readByName)

module.exports = lableRouter